package pers.gxm.abstractfactory.listfactory;

import pers.gxm.abstractfactory.factory.Link;

public class ListLink extends Link {
    public ListLink(String caption,String url){
        super(caption, url);
    }
    @Override
    public String makeHTML() {
        StringBuffer sb = new StringBuffer();
        addTab(sb);
        sb.append("<li><a href=\"");
        sb.append(url);
        sb.append("\">");
        sb.append(caption);
        sb.append("</a></li>\n");
//        return String.format("<li><a href=\"%s\">%s</a></li>\n",url,caption);
        return sb.toString();
    }



}
